LDFLAGS= -static -static-libgcc -static-libstdc++ -Llibui/ -lui \
	     -luser32 -lkernel32 -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 \
		 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc -luuid -lwindowscodecs\
	     -luser32 -lkernel32 -lgdi32 -lcomctl32 -luxtheme -lmsimg32\
         -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc -luuid\
         -mwindows
OPT=-O2
CXX=g++
CFLAGS= -O2

objects = myui.o resources.res
myui.exe: $(objects) 
	g++ ${OPT} -o $@ $(objects) ${LDFLAGS}

resources.res:resources\resources.rc
	windres -D_UI_STATIC $< -O coff -o $@ 

.PHONY:clean
clean:
ifeq ($(OS), Windows_NT)
	del /F /Q myui.exe $(objects)
else
	rm -f myui.exe $(objects)
endif
